package com.atguigu.common.exception;

import com.atguigu.common.results.ResultCodeEnum;
import lombok.Getter;

@Getter
public class BusinessException extends RuntimeException {

    private Integer code;
    private String message;

    public BusinessException(ResultCodeEnum resultCodeEnum){
        // super(resultCodeEnum.getMessage());
        this.code = resultCodeEnum.getCode();
        this.message = resultCodeEnum.getMessage();
    }
}
